from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.engine import create_engine
from sqlalchemy.orm import sessionmaker

# 数据库基类
Base = declarative_base()

DATABASE_URL = "mysql+pymysql://root:damon123@8.134.213.73:3308/fastapi-db"
engine = create_engine(DATABASE_URL, encoding="utf8", echo=True)
SessionLocal = sessionmaker(bind=engine, autoflush=False, autocommit=False)
